#include <stdio.h>
#include <unistd.h>

int main()
{
    FILE* fp = fopen("./1.txt","w+");
    if(fp == NULL)
    {
        perror("fopen");
        return 0;
    }
    fwrite("hello bite",1,11,fp);
    fseek(fp,0,SEEK_SET);
    char buf[1024] = {0};
    fread(buf,1,sizeof(buf)-1,fp);
    printf("%s\n",buf);

    return 0;
}
